import { getStore, setStore } from '@/utils/store'

const data = {
    state: {
        goodsEdit: getStore({
            name: 'goodsEdit'
        }) || {},
        goodsBusiness: getStore({ name: 'goodsBusiness' }) || '',
        // 业态
        businessTypeList: [
            {
                label: "商超",
                value: '02'
            },
            {
                label: "咖吧",
                value: "05"
            },
            {
                label: "洗衣",
                value: "03"
            },
            {
                label: "家政",
                value: "04"
            }
        ]
    },

    mutations: {
        SET_ACCESS_goodsEdit: (state, goodsEdit) => {
            state.goodsEdit = goodsEdit
            setStore({
                name: 'goodsEdit',
                content: state.goodsEdit,
                type: 'session'
            })
        },
        SET_GOODSBUSINESS: (state, goodsBusiness) => {
            state.goodsBusiness = goodsBusiness
            setStore({
                name: 'goodsBusiness',
                content: state.goodsBusiness,
                type: 'session'
            })
        },
    },

    actions: {

    }
}

export default data
